package com.xhb.dubbo.controller;

import com.xhb.dubbo.api.TestService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.xhb.dubbo.api.UserService;
import com.xhb.dubbo.entity.User;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class UserController {

    @Reference
    private UserService userService;

    @Reference
    private TestService testService;

    @RequestMapping(value = "/showUserInfo")
    public String showUserInfo(User user) {
        testService.test(user.getName());
        System.out.println("-------");
        return userService.showUserName(user);
    }
}
